{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "RE_YN_1.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyOFzylziOmOrVKTPw64l3pk",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/Divyanshu-ISM/Oil-and-Gas-data-analysis/blob/master/RE_YN_1.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "1XAWoQ-IdScX",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "import numpy as np\n",
        "import pandas as pd\n",
        "import matplotlib.pyplot as plt\n",
        "from mpl_toolkits import mplot3d"
      ],
      "execution_count": 2,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "gZ2Dp4UXebw_",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 54
        },
        "outputId": "914ed4ad-6ad7-4663-c635-e90db47e2cd7"
      },
      "source": [
        "plt.style.use('default')\n",
        "plt.figure(figsize=(6,6))"
      ],
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<Figure size 600x600 with 0 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 4
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 600x600 with 0 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "SkNRG_gxlfvN",
        "colab_type": "text"
      },
      "source": [
        "##2D Reservoir Simulation \n",
        "\n",
        "###Case1\n",
        "Less Grid Blocks"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "9g9xKXTXdmVM",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 505
        },
        "outputId": "8568998a-b248-4300-9f1d-a420f3279003"
      },
      "source": [
        "#Enter number of Grid blocks in X-D and Y-D\n",
        "xi = 4 ; yi = 3\n",
        "\n",
        "#Create blockwise coordinates as per Engg. Notation\n",
        "x_c = np.arange(1,xi+1)\n",
        "y_c = np.arange(1,yi+1)\n",
        "\n",
        "x, y = np.meshgrid(x_c, y_c, indexing='ij')\n",
        "\n",
        "#plot these grid points\n",
        "plt.scatter(x,y)\n",
        "\n",
        "# Note- Python starts indexing from 0. So, block 1,1 refers to [0,0], block 2,1\n",
        "# refers to [1,0] and so on. In other words, block i,j refers to [i-1,j-1]\n",
        "\n",
        "# define parameters, in this case blocks are homogeneous and same in size\n",
        "dx = 250 # ft\n",
        "dy = 300\n",
        "dz = 100\n",
        "kx = 270 # md\n",
        "ky = 220\n",
        "B = 1 # RB/STB\n",
        "mu = 2 # cp\n",
        "\n",
        "# assign all params to all blocks\n",
        "dx = np.array([[dx]*yi]*xi)\n",
        "dy = np.array([[dy]*yi]*xi)\n",
        "dz = np.array([[dz]*yi]*xi)\n",
        "kx = np.array([[kx]*yi]*xi)\n",
        "ky = np.array([[ky]*yi]*xi)\n",
        "B = np.array([[B]*yi]*xi)\n",
        "mu = np.array([[mu]*yi]*xi)\n",
        "\n",
        "\n",
        "# source term\n",
        "xsc = 3; ysc = 2 # grid point (x and y coordinate) of the source \n",
        "q = -400 \n",
        "\n",
        "qsc = np.array([[0]*yi]*xi) # initiate with zeros\n",
        "qsc[xsc-1,ysc-1] = q # substitute the source to block 3,2\n",
        "\n",
        "# plot the injected grid point, over the same canvas just \n",
        "#plot/replace the wellblock with red.\n",
        "plt.scatter(x[xsc-1,ysc-1], y[xsc-1,ysc-1], color='red')\n",
        "\n",
        "\n",
        "print('Source term (qsc) in Block {},{}: {} STB/D'. format(x[xsc-1,ysc-1], y[xsc-1,ysc-1], qsc[xsc-1,ysc-1]))\n",
        "\n",
        "\n",
        "##########\n",
        "\n",
        "\n",
        "for a, i, c in zip(range(0, xi-2), range(1, xi-1), range(2, xi)):\n",
        "  for d, j, e in zip(range(0, yi-2), range(1, yi-1), range(2, yi)):\n",
        "    Ax = dy[i,j] * dz[i,j]\n",
        "    Ay = dx[i,j] * dz[i,j]\n",
        "\n",
        "    # flow to x direction\n",
        "    Tx_min = .001127 * (kx[i,j] * Ax) / (mu[i,j] * B[i,j] * dx[i,j])\n",
        "    Tx_plus = Tx_min\n",
        "\n",
        "    # flow to y direction\n",
        "    Ty_min = .001127 * (ky[i,j] * Ay) / (mu[i,j] * B[i,j] * dy[i,j])\n",
        "    Ty_plus = Ty_min \n",
        " \n",
        "    # flow equations for internal blocks.\n",
        "    print('Block {},{}: {} (p{},{} - p{},{}) + {} (p{},{} - p{},{}) + {} (p{},{} - p{},{}) + {} (p{},{} - p{},{}) + ({})'.format(i+1, j+1, Tx_min, a+1, j+1, i+1, j+1, Tx_plus, c+1, j+1, i+1, j+1, Ty_min, i+1, d+1, i+1, j+1, Ty_plus, i+1, e+1, i+1, j+1, qsc[i,j]))\n"
      ],
      "execution_count": 15,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Source term (qsc) in Block 3,2: -400 STB/D\n",
            "Block 2,2: 18.257399999999997 (p1,2 - p2,2) + 18.257399999999997 (p3,2 - p2,2) + 10.330833333333333 (p2,1 - p2,2) + 10.330833333333333 (p2,3 - p2,2) + (0)\n",
            "Block 3,2: 18.257399999999997 (p2,2 - p3,2) + 18.257399999999997 (p4,2 - p3,2) + 10.330833333333333 (p3,1 - p3,2) + 10.330833333333333 (p3,3 - p3,2) + (-400)\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAGdCAYAAAAxCSikAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPYQAAD2EBqD+naQAAADh0RVh0U29mdHdhcmUA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9crp9Mpj8ejqKio1h4OAAAIgp33b35LCAAAGI/AAgAAjEdgAQAAxiOwAAAA4xFYAACA8QgsAADAeAQWAABgPAILAAAwHoEFAAAYj8ACAACMR2ABAADGI7AAAADjEVgAAIDxCCwAAMB4BBYAAGA8AgsAADAegQUAABiPwAIAAIxHYAEAAMYjsAAAAOMRWAAAgPEILAAAwHgEFgAAYDwCCwAAMB6BBQAAGI/AAgAAjEdgAQAAxiOwAAAA4xFYAACA8QgsAADAeAQWAABgPFuBJTc3VwMHDlRkZKRiYmKUkZGhPXv2nHOd1157TTfffLM6deqkTp06KS0tTZs3bw6omTRpkhwOR8A0atQo+3sDAADaJFuBpaSkRFlZWdq4caPWrFmjkydPauTIkaqtrW10neLiYk2YMEGfffaZSktL5XK5NHLkSH3//fcBdaNGjVJFRYV/euedd5q2RwAAoM1xWJZlNXXlH374QTExMSopKdEtt9wS1DqnTp1Sp06d9NJLLykzM1PS6TMsVVVVWrlyZZPG4fV65XQ65fF4FBUV1aRtAACAlmXn/fuCrmHxeDySpOjo6KDX+fvf/66TJ0/WW6e4uFgxMTFKSkrS1KlTdfTo0Ua34fP55PV6AyYAANB2NfkMS11dne68805VVVVp/fr1Qa/3hz/8QatXr9auXbsUEREhSVq+fLkuv/xyJSYmat++fXriiSd05ZVXqrS0VGFhYfW2MWfOHD399NP15nOGBQCAi4edMyxNDixTp07Vxx9/rPXr16tLly5BrTN37lzNnz9fxcXF6tu3b6N13377ra677jp9+umnuv322+st9/l88vl8/sder1cul4vAAgDARSTkHwlNmzZNq1at0meffRZ0WFmwYIHmzp2rTz755JxhRZK6deumq6++Wnv37m1weXh4uKKiogImAADQdrW3U2xZlh588EEVFBSouLhYiYmJQa03f/58/dd//ZdWr16tG2+88bz1hw4d0tGjRxUfH29neAAAoI2ydYYlKytLy5Yt09tvv63IyEi53W653W4dO3bMX5OZmamcnBz/43nz5mnWrFl68803de211/rXqampkSTV1NTo0Ucf1caNG7V//34VFRVp3Lhx6t69u9LT05tpNwEA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ffues65VesuCnySroKDgnDWPPfaY1bt374B5d999t5Wenh7KoRknmGP12WefWZKsn3/+uYVGZaYjR45YkqySkpJGa+666y5rzJgxAfNSUlKs3/3ud6EennGCOV5Lly61nE5nC47KXJ06dbJef/31BpfRV4HOdazoKcuqrq62evToYa1Zs8a69dZbrenTpzda2xq9dcmfYbGrtLRUaWlpAfPS09NVWlraSiMyX79+/RQfH68RI0bo888/b+3htDiPxyNJio6ObrSGvvqHYI6XJNXU1Khr165yuVzn/Z9zW3Tq1CktX75ctbW1Sk1NbbCGvjotmGMl0VNZWVkaM2ZMvZ5pSGv0Frf2s8ntdis2NjZgXmxsrLxer44dO6aOHTu20sjMEx8fryVLlujGG2+Uz+fT66+/rmHDhmnTpk264YYbWnt4LaKurk7Z2dkaMmSI+vTp02hdY33V1q/3OVuwxyspKUlvvvmm+vbtK4/HowULFmjw4MHatWtXyH8ItbXt2LFDqampOn78uK688koVFBSoV69eDdZe6n1l51hdyj0lScuXL9e2bdv0xRdfBFXfGr1FYEHIJCUlKSkpyf948ODB2rdvn1544QX9+c9/bsWRtZysrCzt3LlT69evb+2hXBSCPV6pqakB/1MePHiw/vmf/1mvvPKK/vjHP4Z6mK0qKSlJZWVl8ng8+t///V9NnDhRJSUljb4RX8rsHKtLuacOHjyo6dOna82aNUZfaExgsSkuLk6VlZUB8yorKxUVFcXZlSAMGjToknnznjZtmlatWqV169ad939ojfVVXFxcKIdoFDvH62yXXXaZ+vfvr71794ZodObo0KGDunfvLkkaMGCAvvjiCy1atEivvPJKvdpLva/sHKuzXUo9tXXrVh05ciTgzPepU6e0bt06vfTSS/L5fAoLCwtYpzV6i2tYbEpNTVVRUVHAvDVr1pzzc1H8Q1lZmeLj41t7GCFlWZamTZumgoICrV27VomJiedd51Luq6Ycr7OdOnVKO3bsaPO91ZC6ujr5fL4Gl13KfdWQcx2rs11KPXX77bdrx44dKisr80833nij7rnnHpWVldULK1Ir9VbILue9SFRXV1vbt2+3tm/fbkmynn/+eWv79u3Wd999Z1mWZc2cOdO67777/PXffvutdfnll1uPPvqo9fXXX1uLFy+2wsLCrMLCwtbahRZj91i98MIL1sqVK61vvvnG2rFjhzV9+nSrXbt21qefftpau9Aipk6dajmdTqu4uNiqqKjwT3//+9/9Nffdd581c+ZM/+PPP//cat++vbVgwQLr66+/tmbPnm1ddtll1o4dO1pjF1pUU47X008/ba1evdrat2+ftXXrVmv8+PFWRESEtWvXrtbYhRYzc+ZMq6SkxCovL7e+/PJLa+bMmZbD4bA++eQTy7Loq1+ze6wu1Z5qzNnfEjKhty75wHLmq7dnTxMnTrQsy7ImTpxo3XrrrfXW6devn9WhQwerW7du1tKlS1t83K3B7rGaN2+edd1111kRERFWdHS0NWzYMGvt2rWtM/gW1NAxkhTQJ7feeqv/uJ3x3nvvWT179rQ6dOhg9e7d2/roo49aduCtpCnHKzs727rmmmusDh06WLGxsdYdd9xhbdu2reUH38L+/d//3eratavVoUMHq3Pnztbtt9/ufwO2LPrq1+weq0u1pxpzdmAxobcclmVZoTt/AwAAcOG4hgUAABiPwAIAAIxHYAEAAMYjsAAAAOMRWAAAgPEILAAAwHgEFgAAYDwCCwAAMB6BBQAAGI/AAgAAjEdgAQAAxiOwAAAA4/1/NWZxbw+2FTEAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "_Vj3GdePeXK2",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "###########################################################################"
      ],
      "execution_count": 1,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "t85zc0srlqlz",
        "colab_type": "text"
      },
      "source": [
        "###Case 2\n",
        "\n",
        "'More Grid Blocks'\n",
        "\n",
        "7X5 Block scene | Production in block 5,4"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Tgi9UZ99nwA_",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 54
        },
        "outputId": "fc47aa81-d6a7-4f0c-b738-6290f098876b"
      },
      "source": [
        "plt.style.use('default')\n",
        "plt.figure(figsize=(6,6))"
      ],
      "execution_count": 11,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<Figure size 600x600 with 0 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 11
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 600x600 with 0 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "16cswb2dnTfn",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "import numpy as np\n",
        "import pandas as pd\n",
        "import matplotlib.pyplot as plt\n",
        "from mpl_toolkits import mplot3d"
      ],
      "execution_count": 3,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "vMQmiE0Kfdtj",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 723
        },
        "outputId": "510bdf86-752b-4bd3-9439-df0fccc347dc"
      },
      "source": [
        "#1. No. of blocks in x and y\n",
        "xi = 7 ; yi = 5\n",
        "\n",
        "#2. Block coordinates (Given Block centered system)\n",
        "x_c = np.arange(1,xi+1) # +1 because last term gets skipped\n",
        "y_c = np.arange(1,yi+1) \n",
        "\n",
        "x,y = np.meshgrid(x_c,y_c,indexing='ij')\n",
        "\n",
        "plt.scatter(x,y)\n",
        "\n",
        "#3. define parameters, in this case blocks are homogeneous and same in size\n",
        "dx = 250 # ft\n",
        "dy = 300\n",
        "dz = 100\n",
        "kx = 270 # md\n",
        "ky = 220\n",
        "B = 1 # RB/STB\n",
        "mu = 2 # cp\n",
        "\n",
        "\n",
        "#4. assign all params to all blocks\n",
        "dx = np.array([[dx]*yi]*xi)\n",
        "dy = np.array([[dy]*yi]*xi)\n",
        "dz = np.array([[dz]*yi]*xi)\n",
        "kx = np.array([[kx]*yi]*xi)\n",
        "ky = np.array([[ky]*yi]*xi)\n",
        "B = np.array([[B]*yi]*xi)\n",
        "mu = np.array([[mu]*yi]*xi)\n",
        "\n",
        "\n",
        "#5. source term\n",
        "xsc = 5; ysc = 4 # grid point (x and y coordinate) of the source \n",
        "q = -400 \n",
        "qsc = np.array([[0]*yi]*xi) # initiate with zeros\n",
        "qsc[xsc-1,ysc-1] = q # inject the source to block 5,4\n",
        "\n",
        "\n",
        "# plot the well grid point\n",
        "plt.scatter(x[xsc-1,ysc-1], y[xsc-1,ysc-1], color='red') \n",
        "# -1 because we are visualizing as per 1 indexing and python has a 0 indexing. \n",
        "\n",
        "#Displaying the equations.\n",
        "for a, i, c in zip(range(0, xi-2), range(1, xi-1), range(2, xi)):\n",
        "  for d, j, e in zip(range(0, yi-2), range(1, yi-1), range(2, yi)):\n",
        "    Ax = dy[i,j] * dz[i,j]\n",
        "    Ay = dx[i,j] * dz[i,j]\n",
        "\n",
        "    # flow to x direction\n",
        "    Tx_min = .001127 * (kx[i,j] * Ax) / (mu[i,j] * B[i,j] * dx[i,j])\n",
        "    Tx_plus = Tx_min\n",
        "\n",
        "    # flow to y direction\n",
        "    Ty_min = .001127 * (ky[i,j] * Ay) / (mu[i,j] * B[i,j] * dy[i,j])\n",
        "    Ty_plus = Ty_min \n",
        " \n",
        "    # flow equation\n",
        "    print(f'Block {i+1},{j+1}: {Tx_min} (p{a+1},{j+1} - p{i+1},{j+1}) + {Tx_plus} (p{c+1},{j+1} - p{i+1},{j+1}) + {Ty_min} (p{i+1},{d+1} - p{i+1},{j+1}) + {Ty_plus} (p{i+1},{e+1} - p{i+1},{j+1}) + ({qsc[i,j]})')"
      ],
      "execution_count": 16,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Block 2,2: 18.257399999999997 (p1,2 - p2,2) + 18.257399999999997 (p3,2 - p2,2) + 10.330833333333333 (p2,1 - p2,2) + 10.330833333333333 (p2,3 - p2,2) + (0)\n",
            "Block 2,3: 18.257399999999997 (p1,3 - p2,3) + 18.257399999999997 (p3,3 - p2,3) + 10.330833333333333 (p2,2 - p2,3) + 10.330833333333333 (p2,4 - p2,3) + (0)\n",
            "Block 2,4: 18.257399999999997 (p1,4 - p2,4) + 18.257399999999997 (p3,4 - p2,4) + 10.330833333333333 (p2,3 - p2,4) + 10.330833333333333 (p2,5 - p2,4) + (0)\n",
            "Block 3,2: 18.257399999999997 (p2,2 - p3,2) + 18.257399999999997 (p4,2 - p3,2) + 10.330833333333333 (p3,1 - p3,2) + 10.330833333333333 (p3,3 - p3,2) + (0)\n",
            "Block 3,3: 18.257399999999997 (p2,3 - p3,3) + 18.257399999999997 (p4,3 - p3,3) + 10.330833333333333 (p3,2 - p3,3) + 10.330833333333333 (p3,4 - p3,3) + (0)\n",
            "Block 3,4: 18.257399999999997 (p2,4 - p3,4) + 18.257399999999997 (p4,4 - p3,4) + 10.330833333333333 (p3,3 - p3,4) + 10.330833333333333 (p3,5 - p3,4) + (0)\n",
            "Block 4,2: 18.257399999999997 (p3,2 - p4,2) + 18.257399999999997 (p5,2 - p4,2) + 10.330833333333333 (p4,1 - p4,2) + 10.330833333333333 (p4,3 - p4,2) + (0)\n",
            "Block 4,3: 18.257399999999997 (p3,3 - p4,3) + 18.257399999999997 (p5,3 - p4,3) + 10.330833333333333 (p4,2 - p4,3) + 10.330833333333333 (p4,4 - p4,3) + (0)\n",
            "Block 4,4: 18.257399999999997 (p3,4 - p4,4) + 18.257399999999997 (p5,4 - p4,4) + 10.330833333333333 (p4,3 - p4,4) + 10.330833333333333 (p4,5 - p4,4) + (0)\n",
            "Block 5,2: 18.257399999999997 (p4,2 - p5,2) + 18.257399999999997 (p6,2 - p5,2) + 10.330833333333333 (p5,1 - p5,2) + 10.330833333333333 (p5,3 - p5,2) + (0)\n",
            "Block 5,3: 18.257399999999997 (p4,3 - p5,3) + 18.257399999999997 (p6,3 - p5,3) + 10.330833333333333 (p5,2 - p5,3) + 10.330833333333333 (p5,4 - p5,3) + (0)\n",
            "Block 5,4: 18.257399999999997 (p4,4 - p5,4) + 18.257399999999997 (p6,4 - p5,4) + 10.330833333333333 (p5,3 - p5,4) + 10.330833333333333 (p5,5 - p5,4) + (-400)\n",
            "Block 6,2: 18.257399999999997 (p5,2 - p6,2) + 18.257399999999997 (p7,2 - p6,2) + 10.330833333333333 (p6,1 - p6,2) + 10.330833333333333 (p6,3 - p6,2) + (0)\n",
            "Block 6,3: 18.257399999999997 (p5,3 - p6,3) + 18.257399999999997 (p7,3 - p6,3) + 10.330833333333333 (p6,2 - p6,3) + 10.330833333333333 (p6,4 - p6,3) + (0)\n",
            "Block 6,4: 18.257399999999997 (p5,4 - p6,4) + 18.257399999999997 (p7,4 - p6,4) + 10.330833333333333 (p6,3 - p6,4) + 10.330833333333333 (p6,5 - p6,4) + (0)\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGdCAYAAADAAnMpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPYQAAD2EBqD+naQAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3dbXBU533+8WuRQKK2do0c6wFrASUQQKjiycEIEhvb2CAYDcpMHZfBBRLwjPlLLdhN6qoDBUwcgRkmJmNH+CFGbSnDmKSYQmsRBRsYiiiP6kgw0JAIkI1WpMXsShqzptL+X3jYsgWJ+0gr7iPx/cycF3t0H52fLjTey7tnjzyRSCQiAAAAS/rZHgAAANzbKCMAAMAqyggAALCKMgIAAKyijAAAAKsoIwAAwCrKCAAAsIoyAgAArEq0PYCJ9vZ2Xbp0SSkpKfJ4PLbHAQAABiKRiJqbmzV48GD169fx6x+9ooxcunRJfr/f9hgAAKALGhoalJWV1eHXe0UZSUlJkfTVD+P1ei1PAwAATIRCIfn9/ujzeEd6RRm58daM1+uljAAA0Mvc6RILLmAFAABW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eeuihyFNPPRX59a9/bXusXuPxxx+PLF261PYYrvTcc89FMjMzIwMGDIg8/PDDkeeeey5y7tw522O51q5duyK5ubmRpKSkyKhRoyLvvPOO7ZFca8+ePRFJkbNnz1qdwxOJRCJ2ahAAAAAXsAIAAMsoIwAAwCrKCAAAsIoyAgAArKKMAAAAqygjAADAKsoIAACwijICAACsoowAAACrKCMAAMAqyggAALCKMgIAAKz6/9k86cjXzS8uAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "65c1GJRofelV",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "#################################################################"
      ],
      "execution_count": 17,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "P_6P7rKnrK9N",
        "colab_type": "text"
      },
      "source": [
        "#Case 3. Many Grid Blocks."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "sPO6_VDjrKMw",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "##To. Do."
      ],
      "execution_count": 18,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ivR62j6DrvYy",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        ""
      ],
      "execution_count": null,
      "outputs": []
    }
  ]
}